﻿
using BattleCore.proto;
using BattleCore.utils;
using System.IO;

namespace BattleCore
{
    class Program
    {
      
        static void Main(string[] args)
        {
            skill_audio_clip a = new skill_audio_clip()
            {
                _startFrame = 10,
            };
            var bytes = util_serialize.ProtoSerialize<skill_audio_clip>(a);
            using (FileStream fs = new FileStream("../../Resources/a.ob", FileMode.Create, FileAccess.Write))
            using (BinaryWriter writer = new BinaryWriter(fs))
            {
                writer.Write(bytes);
            }

            bytes= File.ReadAllBytes("../../resources/a.ob");



            a = util_serialize.ProtoDeserialize<skill_audio_clip>(bytes);
            var bbb =a._startFrame;

        }
    }
}
